﻿Imports System Imports System.Collections.Generic Imports System.Text

Public Class CCTHoaDon

#Region "Khai báo thuộc tính"

    Private _maHoaDon As String
    Private _maSP As String
    Private _giaSP As Double
    Private _soLuong As Integer
    Private _ghiChu As String
    Private _SanPham_maSP As Integer
    Private _HoaDon_maHD As Integer

    Public Property maHoaDon() As String
        Get
            Return _maHoaDon
        End Get
        Set(ByVal value As String)
            _maHoaDon = value
        End Set
    End Property

    Public Property maSP() As String
        Get
            Return _maSP
        End Get
        Set(ByVal value As String)
            _maSP = value
        End Set
    End Property

    Public Property giaSP() As Double
        Get
            Return _giaSP
        End Get
        Set(ByVal value As Double)
            _giaSP = value
        End Set
    End Property

    Public Property soLuong() As Integer
        Get
            Return _soLuong
        End Get
        Set(ByVal value As Integer)
            _soLuong = value
        End Set
    End Property

    Public Property ghiChu() As String
        Get
            Return _ghiChu
        End Get
        Set(ByVal value As String)
            _ghiChu = value
        End Set
    End Property

    Public Property SanPham_maSP() As Integer
        Get
            Return _SanPham_maSP
        End Get
        Set(ByVal value As Integer)
            _SanPham_maSP = value
        End Set
    End Property

    Public Property HoaDon_maHD() As Integer
        Get
            Return _HoaDon_maHD
        End Get
        Set(ByVal value As Integer)
            _HoaDon_maHD = value
        End Set
    End Property
#End Region

#Region "Phương thức khởi tạo"
    Public Sub New()
        Me.maHoaDon = ""
        Me.maSP = ""
        Me.giaSP = 0
        Me.soLuong = 0
        Me.ghiChu = ""
        Me.SanPham_maSP = 0
        Me.HoaDon_maHD = 0
    End Sub
    Public Sub New(ByVal chiTietHD As CCTHoaDon)
        Me.maHoaDon = chiTietHD.maHoaDon
        Me.maSP = chiTietHD.maSP
        Me.giaSP = chiTietHD.giaSP
        Me.soLuong = chiTietHD.soLuong
        Me.ghiChu = chiTietHD.ghiChu
        Me.SanPham_maSP = chiTietHD.SanPham_maSP
        Me.HoaDon_maHD = chiTietHD.HoaDon_maHD
    End Sub
    Public Sub New(ByVal ma_HoaDon As String, ByVal ma_SP As String, ByVal gia_Sp As Double, ByVal so_Luong As Integer, ByVal ghi_Chu As String, ByVal SanPham_ma_SP As Integer, ByVal HoaDon_ma_HD As Integer)
        Me.maHoaDon = ma_HoaDon
        Me.maSP = ma_SP
        Me.giaSP = gia_Sp
        Me.soLuong = so_Luong
        Me.ghiChu = ghi_Chu
        Me.SanPham_maSP = SanPham_ma_SP
        Me.HoaDon_maHD = HoaDon_ma_HD
    End Sub
#End Region
End Class

